Skip to content

Add Spanish (Latin America) translation and regional language codes - #44

Merged
dannycoulombe merged 1 commit into
BenchUp3D:mainfrom
Jairolaya12x:add-spanish-translation
Nov 13, 2026
Merged

dannycoulombe merged 1 commit into
BenchUp3D:mainfrom
Jairolaya12x:add-spanish-translation

Conversation

@Jairolaya12x

@Jairolaya12x Jairolaya12x commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a Spanish (Latin America) translation and makes every language code follow the same language_REGION format.

Spanish translation

  • New assets/i18n/es_419.json catalog covering every message in the English source.
  • Fixed entries that had been left in English, mostly ones containing "Y" (e.g. "Y axis" → "Eje Y", "Flip Y" → "Voltear Y", "Board Y" → "Tabla Y"), as well as "Hectares" → "Hectáreas".
  • Spanish appears in the language picker and is detected from browser/OS locales (es, es-ES, es-MX, es-419, …).

Consistent language codes

  • en → en_US and es → es_419, matching the existing zh_CN and pt_BR.
  • Renamed the catalogs to en_US.json and es_419.json, and updated build.rs, the web startup loader in index.html, the web test scripts and AGENTS.md.
  • Saved preferences that still contain en or es are converted to the new codes automatically, so no one loses their selected language.
  • Locale detection now falls back by primary language for every catalog (previously only Portuguese did this), while Traditional Chinese still never maps to zh_CN.

Language picker

  • Renamed the keys settings.language_* → settings.language.*.
  • Translated catalogs show each language by its native name (English, 简体中文, Português (Brasil), Español), matching the existing zh_CN and pt_BR catalogs.
  • Added "Español" to the zh_CN and pt_BR catalogs, which previously showed "Spanish".

Tests

  • Added Spanish cases alongside the existing pt_BR ones: label, format and plural switching, settings window, View menu, export dialog and presets, first-launch language persistence, 3D Mouse status, and history labels.
  • New tests:
    • supported_languages_include_spanish
    • language_picker_shows_native_names_in_translated_catalogs
    • every_language_code_uses_language_and_region
    • saved_bare_language_codes_migrate_to_regional_codes
    • Spanish locale detection

@Jairolaya12x

Copy link
Copy Markdown
Contributor Author

Hey @dannycoulombe, do you think we could rename these keys to follow the settings.language.<option-here> convention?

"settings.language_simplified_chinese": "Chino simplificado",
"settings.language_brazilian_portuguese": "Portugués brasileño",
"settings.language_spanish": "Español",

This would make it easier to validate and manage the available language options consistently.

WDYT?

@dannycoulombe

Copy link
Copy Markdown
Collaborator

That makes perfect sense to me! Yes.

@dannycoulombe
dannycoulombe marked this pull request as ready for review November 13, 2026 12:53
@Jairolaya12x
Jairolaya12x force-pushed the add-spanish-translation branch from c0038bb to 4a40c6b Compare November 13, 2026 15:47
@Jairolaya12x Jairolaya12x changed the title Add Spanish translation [WIP] Add Spanish translation Nov 13, 2026
@Jairolaya12x Jairolaya12x changed the title Add Spanish translation Add Spanish (Latin America) translation and regional language codes Nov 13, 2026
@Jairolaya12x
Jairolaya12x force-pushed the add-spanish-translation branch from 4a40c6b to bc0df21 Compare November 13, 2026 16:02
@Jairolaya12x

Copy link
Copy Markdown
Contributor Author

Hey @dannycoulombe I added some changes on the structure of the i18n files, please let me know if this is ok, because I think that can affect the next PRs

@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@BenchUp3D BenchUp3D deleted a comment from ecc-tools Bot Nov 13, 2026
@dannycoulombe

Copy link
Copy Markdown
Collaborator

Good catch for the language code. I agree.

@dannycoulombe

Copy link
Copy Markdown
Collaborator
  • Translated catalogs show each language by its native name (English, 简体中文, Português (Brasil), Español), matching the existing zh_CN and pt_BR catalogs.

100%

@dannycoulombe
dannycoulombe merged commit b7d5b82 into BenchUp3D:main Nov 13, 2026
3 checks passed
@dannycoulombe

Copy link
Copy Markdown
Collaborator

Te agradezco mucho por este commit! Saludos desde Mexico!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants